inherited ClientFrame: TClientFrame
  Width = 777
  Height = 496
  Padding.Left = 25
  Padding.Top = 20
  Padding.Right = 25
  Padding.Bottom = 25
  ExplicitWidth = 777
  ExplicitHeight = 496
  object InfoPanel: TPanel
    AlignWithMargins = True
    Left = 25
    Top = 25
    Width = 727
    Height = 106
    Margins.Left = 0
    Margins.Top = 5
    Margins.Right = 0
    Margins.Bottom = 0
    Align = alTop
    BevelOuter = bvNone
    TabOrder = 0
    object Image: TImage
      AlignWithMargins = True
      Left = 636
      Top = 0
      Width = 91
      Height = 106
      Margins.Left = 10
      Margins.Top = 0
      Margins.Right = 0
      Margins.Bottom = 0
      Align = alRight
      Proportional = True
      Visible = False
      ExplicitLeft = 622
      ExplicitHeight = 121
    end
    object HistoryGrid: TDBGrid
      AlignWithMargins = True
      Left = 517
      Top = 0
      Width = 109
      Height = 106
      Margins.Left = 0
      Margins.Top = 0
      Margins.Right = 0
      Margins.Bottom = 0
      Align = alClient
      DataSource = HistorySource
      DefaultDrawing = False
      Options = [dgColumnResize, dgColLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
      TabOrder = 1
      TitleFont.Charset = DEFAULT_CHARSET
      TitleFont.Color = clWindowText
      TitleFont.Height = -13
      TitleFont.Name = 'Tahoma'
      TitleFont.Style = []
      OnCellClick = HistoryGridCellClick
      OnDrawColumnCell = HistoryGridDrawColumnCell
      Columns = <
        item
          Expanded = False
          FieldName = 'UNION_DESC'
          Title.Caption = 'Ajalugu'
          Width = 700
          Visible = True
        end>
    end
    object LeftPanel: TPanel
      AlignWithMargins = True
      Left = 0
      Top = 0
      Width = 517
      Height = 106
      Margins.Left = 0
      Margins.Top = 0
      Margins.Right = 0
      Margins.Bottom = 0
      Align = alLeft
      BevelOuter = bvNone
      TabOrder = 0
      ExplicitHeight = 128
      object Label11: TLabel
        Left = 1
        Top = 0
        Width = 62
        Height = 16
        Caption = 'Kaart kuni:'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = 7829367
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label12: TLabel
        Left = 1
        Top = 24
        Width = 39
        Height = 16
        Caption = 'Grupp:'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = 7829367
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label22: TLabel
        Left = 250
        Top = 24
        Width = 41
        Height = 16
        Caption = 'E-mail:'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = 7829367
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label21: TLabel
        Left = 250
        Top = 0
        Width = 48
        Height = 16
        Caption = 'Telefon:'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = 7829367
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Info11: TDBText
        Left = 75
        Top = 0
        Width = 165
        Height = 17
        DataField = 'KEHTIVATE_KAARTIDE_KIRJELDUS'
      end
      object Info13: TDBText
        Left = 75
        Top = 48
        Width = 138
        Height = 17
        DataField = 'MARKUSED'
      end
      object Info21: TDBText
        Left = 320
        Top = 1
        Width = 165
        Height = 17
        DataField = 'TEL'
      end
      object Info22: TDBText
        Left = 320
        Top = 24
        Width = 195
        Height = 17
        DataField = 'EMAIL'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clNavy
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = [fsUnderline]
        ParentFont = False
      end
      object Info12: TDBText
        Left = 75
        Top = 24
        Width = 165
        Height = 17
        DataField = 'GRUPP'
      end
      object Label13: TLabel
        Left = 1
        Top = 48
        Width = 60
        Height = 16
        Caption = 'M'#228'rkused:'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = 7829367
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Label23: TLabel
        Left = 250
        Top = 48
        Width = 50
        Height = 16
        Caption = 'Piirkond:'
        Font.Charset = DEFAULT_CHARSET
        Font.Color = 7829367
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
      end
      object Info23: TDBText
        Left = 320
        Top = 48
        Width = 165
        Height = 17
        DataField = 'PIIRKOND'
      end
      object ClientDataButton: TSpeedButton
        Left = 1
        Top = 81
        Width = 113
        Height = 25
        AllowAllUp = True
        GroupIndex = 1
        Caption = 'Andmed'
        OnClick = ClientDataButtonClick
      end
      object RepBtn: TButton
        Left = 146
        Top = 47
        Width = 75
        Height = 25
        Caption = 'RepBtn'
        TabOrder = 0
        OnClick = RepBtnClick
      end
      object NewOrderButton: TButton
        Left = 120
        Top = 81
        Width = 114
        Height = 25
        Caption = 'Uus m'#252#252'k'
        TabOrder = 1
        OnClick = NewOrderButtonClick
      end
      object NewPreorderButton: TButton
        Left = 240
        Top = 81
        Width = 131
        Height = 25
        Caption = 'Uus tellimus'
        TabOrder = 2
      end
      object ExtraButton: TButton
        Left = 377
        Top = 81
        Width = 121
        Height = 25
        Caption = 'Uus k'#252'lastus'
        TabOrder = 3
      end
    end
  end
  object EventPanel: TPanel
    Left = 25
    Top = 131
    Width = 727
    Height = 340
    Margins.Left = 0
    Margins.Top = 0
    Margins.Right = 0
    Margins.Bottom = 0
    Align = alClient
    BevelOuter = bvNone
    Padding.Top = 30
    TabOrder = 1
    ExplicitTop = 212
    ExplicitHeight = 259
  end
  object HistorySource: TDataSource
    DataSet = HistoryDs
    Left = 632
    Top = 75
  end
  object HistoryDs: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftInteger
        Name = 'client_id'
        ParamType = ptInput
        Value = '1'
      end>
    ProviderName = 'HistoryProvider'
    AfterScroll = HistoryDsAfterScroll
    OnCalcFields = HistoryDsCalcFields
    Left = 632
    Top = 112
    object HistoryDsARVE_ID: TIntegerField
      FieldName = 'ARVE_ID'
      Required = True
    end
    object HistoryDsSYNDMUSE_AEG: TSQLTimeStampField
      FieldName = 'SYNDMUSE_AEG'
      DisplayFormat = 'dd.mm'
    end
    object HistoryDsKIRJELDUS: TStringField
      FieldName = 'KIRJELDUS'
      Size = 412
    end
    object HistoryDsUNION_DESC: TStringField
      FieldKind = fkCalculated
      FieldName = 'UNION_DESC'
      Size = 500
      Calculated = True
    end
  end
  object HistoryProvider: TDataSetProvider
    DataSet = HistoryQuery
    Left = 632
    Top = 144
  end
  object HistoryQuery: TSQLDataSet
    SchemaName = 'sysdba'
    GetMetadata = False
    CommandText = 
      'select'#13#10'a.id as arve_id,'#13#10'coalesce(arve_aeg, tellimuse_aeg) as s' +
      'yndmuse_aeg,'#13#10'trim (case when arve_aeg is null then '#39'T: '#39' else '#39 +
      #39' end '#13#10#9'|| cast (substring(list(t.nimetus, '#39'; '#39') from 1 for 100' +
      ') as varchar(100))) as kirjeldus'#13#10'from arved a'#13#10'join arve_read a' +
      'r on ar.arve_id = a.id'#13#10'join tooted t on t.id = ar.toote_id'#13#10'whe' +
      're a.kliendi_id = :client_id'#13#10'group by a.id, syndmuse_aeg, a.arv' +
      'e_aeg'#13#10'order by syndmuse_aeg desc'
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftUnknown
        Name = 'client_id'
        ParamType = ptInput
      end>
    SQLConnection = ProgramModule.Connection
    Left = 632
    Top = 176
  end
end
